<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<mesoBoard.Data.ForumPermission>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<% Forum TheForum = (Forum)ViewData["TheForum"]; %>

    <h2><%= TheForum.Name %>'s Forum Permissions</h2>
    
    <div class="right">
    <%= Html.ImageLink("Create Permission", Url.Action("CreateForumPermission", new {ForumID = TheForum.ForumID}), "~/Themes/Default/Images/zones.png", "Create Permission", "image_link")  %>
    </div>
    <%= Html.Spacer(10) %>
    <table class="form_table">
    <tr><th colspan="6" style="text-align: center"><%= Html.ThemeImage("zones.png") %><%= TheForum.Name %>'s Forum Permissions</th></tr>
    <tr>
    <th>Role Name</th>
    <th>Visibility</th>
    <th>Posting</th>
    <th>Polling</th>
    <th>Attachments</th>
    <th style="width: 10%"></th>
    <th style="width: 10%"></th>
    </tr>
    <% foreach(ForumPermission f in Model){ %>
    <tr>
    <th><%= f.Role.Name %></th>
    <td><%= f.Visibility %></td>
    <td><%= f.Posting %></td>    
    <td><%= f.Polling %></td>
    <td><%= f.Attachments %></td>
    <td><%= Html.ActionLink("Edit", "EditForumPermission", new { PermissionID = f.ForumPermissionID}) %></td>
    <td><%= Html.AdminConfirm("Delete", Url.Action("DeleteForumPermission", new { PermissionID = f.ForumPermissionID }), Url.Action("ForumPermissions", new { ForumID = f.ForumID })) %></td>
    </tr>
    <%} %>
    </table>
</asp:Content>
